{% load tags %}
Pradžia: 
<select id="beginYear">
  {% for year in yearList %}
  <option {% ifequal year startDate|extractFromDate:"year" %}selected="selected"{% endifequal %} value="{{ year }}">{{ year }}</option>
  {% endfor %}
</select>
-
<select id="beginMonth">
  {% for m in "1-12"|range %}  
  <option {% ifequal m startDate|extractFromDate:"month" %}selected="selected"{% endifequal %} value="{{ m }}">{{ m }}</option>
  {% endfor %}
</select>
&nbsp;&nbsp;
Pabaiga: 
<select id="finishYear">
  {% for year in yearList %}
  <option {% ifequal year endDate|extractFromDate:"year" %}selected="selected"{% endifequal %} value="{{ year }}">{{ year }}</option>
  {% endfor %}
</select>
-
<select id="finishMonth">
  {% for m in "1-12"|range %}  
  <option {% ifequal m endDate|extractFromDate:"month" %}selected="selected"{% endifequal %} value="{{ m }}">{{ m }}</option>
  {% endfor %}
</select>
&nbsp;&nbsp;&nbsp;
<input type="button" onclick="filterByChosenDate('{{ path }}', 'beginYear', 'beginMonth', 'finishYear', 'finishMonth');" value="Filtruoti">
